I was doubting how, I could read input from the console using the Scanner class?
here's some code:
Scanner ob=new Scanner(System.in);
System.out.println("Enter your username: ");
String username=ob.nextLine();
System.out.println("Enter the value of a");
int a=ob.nextInt();
So basically all I want to do is have the scanner read an input for the username, and assign the input to a String variable.
Thanks!
Anonymous User
04-Oct-2013